package test2;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class test5 {
	public void main() {
		List<Integer> integers  = new LinkedList<Integer>();
		Collections.addAll(integers, 0,1,2,3,4,5,6,7,8,9);
		
		System.out.println("Przed modyfikacja:");
		System.out.println("integers = "+ integers);
		
		List<Integer> integersSubList = integers.subList(0, 3);
		System.out.println("integersSubList = "+ integersSubList);
		
		integersSubList.set(0,66);
		
		System.out.println("Po modyfikacji");
		System.out.println("integers = "+ integers);
		System.out.println("integersSubList = "+ integersSubList);
	}
}
